<?php include_partial('global/formLabelsJS', array('form' => $form)) ?>

<?php
	if(empty($module)) $module = 'mesdossiers';
	if(!isset($extraParams)){
		$extraParams = '';
	}
	if(!isset($action))
	{
		$action =  url_for($module.'/'.($form->getObject()->isNew() ? 'create?' . $extraParams : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() . '&' .$extraParams : ''));
	} 
?> 
<!-- Div pour affichage des erreurs en Haut de page -->
<div id="errorDisplay"></div>
<form id = "myForm" action="<?php echo $action?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?> tmt:validate = "true" tmt:callback="errorOnLabels">
	<?php if(!$form->getObject()->isNew()): ?>
		<input type="hidden" name="sf_method" value="put" />
	<?php endif; ?>
	<fieldset>
		<legend><?php echo $sf_user->getFlash('legendTitle') ?></legend>
		<div id="errorDisplayHaut" class="errorDisplay">&nbsp;</div>
			<!-- INFORMATION GENERALES -->
			<?php $objDef = new objectDef(get_class($form->getObject()))?>
			<?php if($objDef->description): ?>
					<fieldset>
						<legend><?php echo __("General Information"); ?></legend>
			  			<div class="description">
			  				<?php echo $objDef->description?>
			  			</div>
				  	</fieldset>
			<?php endif;?>
		 <?php
		 	if($form->isCSRFProtected())  
				 echo $form['_csrf_token']; 
		 		$montrerTele = true;
		 	if(isset($pasDeTelechargements))
		 	{
		 		if($pasDeTelechargements)
		 		{
		 			$montrerTele = false;
				}
		 	}		
		 	if($montrerTele){include_partial('global/telecharchementFichiers',array('form' => $form));}
			if($sf_user->getAttribute('userAction')=='editForm')
			{
               	include_partial('dossiers/editDossier', array('form' => $form_Phase2, 'module' => $module, 'd'=>$d));
			}
		?>	